<?php

/**
 * Albireo Kernel
 *
 * @copyright  Copyright (c) 2010 Albireo Solutions
 * @package    Kernel
 */

namespace Albireo\Forms;

use \Nette\Application\AppForm;
use \Albireo\Forms\AlbireoFormRenderer;
use Albireo\Forms\TextEmail;

/**
 * Albireo Form Renderer
 *
 * @author     Albireo Solutions
 * @package    Kernel
 */
class AlbireoForm extends AppForm {
    public function __construct() {
        parent::__construct();
        $this->setRenderer(new AlbireoFormRenderer());
    }

    public function addEmail($name, $label = null, $cols = null, $maxLength = null) {
        return $this[$name] = new TextEmail($label, $cols, $maxLength);
    }
}